import * as api from '@src/networking/Api';

//我的项目列表
export const requestLoanList = (page) => {
    return async function() {
        const model = await api.getLoanList(page)
        return model;
    }
}

//项目详情
export const requestLoanItem = (itemApplyId) => {
    return api.getLoanItem(itemApplyId);
}

//动态
export const requestLogList = () => {
    return api.getLogList();
}

//回款计划
export const requestPaymentPlay = () => {
    return async function() {
        const model = await api.getPaymentPlay();
        return model;
    }
}

//回访记录
export const requestReturnVisit = () => {
    return async function() {
        const model = await api.getReturnVisit();
        return model;
    }
}

//审批历史
export const requestApprovalHistory = (data) => {
    return async function() {
        const model = await api.getApprovalHistory(data);
        return model;
    }
}

//删除项目
export const requestDelProject = (id) => {
    return api.delProject(id);
}

//修改项目
export const requestEditProject = (id) => {
    return api.editProject(id);
}

//发起流程
export const requestWorkFlowStart = (data) => {
    return api.workFlowStart(data);
}